package com.finance.system.dao;

import com.finance.system.bean.pojo.UserRoleRel;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface UserRoleMapper {
  UserRoleRel getById(Long id);

  List<UserRoleRel> listByUserCode(String code);

  int add(UserRoleRel userRoleRole);

  int update(UserRoleRel userRoleRole);

  int delete(Long id);

  int deleteByCode(String code);

  List<UserRoleRel> queryNo(String code);

  List<UserRoleRel> getByRoleId(Long roleId);

  int delUserRole(Long roleId);

  int delByRoleId(Long roleId);

  int delUser(String code);

  int batchAdd(@Param("userRoleRelList") List<UserRoleRel> userRoleRelList);

  int batchInvalid(@Param("uId") Long uId, @Param("userRoleRelList") List<UserRoleRel> userRoleRelList);

  int batchValid(@Param("uId") Long uId, @Param("userRoleRelList") List<UserRoleRel> userRoleRelList);

  int bathDelByCode(@Param("code") List<String> code);

}